<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <title>客户管理 / 人员管理-新增</title>
  <link rel="stylesheet" href="../../../css/layui.css" media="all">
  <link rel="stylesheet" type="text/css" href="../../../css/common-layer.css"/>
  <link rel="stylesheet" type="text/css" href="../../../zTree/zTreeStyle/zTreeStyle.css"/>
  <style>
  	.layui-form-item{margin-bottom: 10px;}
  	.layui-form-select dl{max-height: 187px;}
  	label{width: 175px !important;}
	.layui-form-item .layui-input-inline{width: 250px !important;}
  	#search-tree,#search2-tree{width: 364px;height: 390px;background: #F6F6F6;position: absolute;top: 38px;left: 0;z-index: 9999;overflow: auto;display: none;}
  </style>
</head>
<body style="background: #fff;overflow-x:hidden ;" class="innerBody">

<form class="layui-form layui-form-pane ml30" action="" id="formHtml" style="width: ;margin-top: 20px;" lay-filter="updForm">
	<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input name="" class="layui-input"  type="text" placeholder="请输入" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">工号</label>
        <div class="layui-input-inline">
            <input name="" class="layui-input"  type="text" placeholder="请输入" autocomplete="off">
        </div>
    </div>
	</div>

	<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-inline" style="border: 1px solid #E6E6E6; height: 36px;">
			  <input type="radio" name="cards" lay-skin="primary" value="" title="保密" >
              <input type="radio" name="cards" lay-skin="primary" value="" title="男">
              <input type="radio" name="cards" lay-skin="primary" value="" title="女" >
         </div>
    </div>
    <div class="layui-inline">
	    <label class="layui-form-label">所属部门</label>
	    <div class="layui-input-inline">
	        <select name="" lay-filter="">
	            <option value="">请选择</option>
				<option value="1">部门1</option>
				<option value="2">部门2</option>
	        </select>
	      </div>
    </div>
	</div>
	<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label label-120">所属人员组</label>
	      <div class="layui-input-inline">
		      <select name="" lay-filter="">
		        <option value="">请选择</option>
		        <option value="1">1</option>
		        <option value="2">2</option>
		      </select>
		    </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">证件类型</label>
        <div class="layui-input-inline">
            <select name="" lay-filter="">
              <option value="">请选择</option>
              <option value="1">身份证</option>
              <option value="2">学生证</option>
            </select>
        </div>
    </div>
	</div>
	<div class="layui-form-item">
    <div class="layui-inline">
        <label class="layui-form-label">证件号</label>
        <div class="layui-input-inline">
            <input name="" class="layui-input" type="text" placeholder="请输入" autocomplete="off">
        </div>
    </div>
    <div class="layui-inline">
        <label class="layui-form-label">入职时间</label>
        <div class="layui-input-inline">
            <input type="text" class="layui-input" id="date" placeholder="请选择日期">
        </div>
    </div>
	</div>
	<div class="layui-form-item layui-form-text">
	    <label class="layui-form-label" style="width: 858px!important;">备注</label>
	    <div class="layui-input-block" style="width: 858px;">
	      <textarea placeholder="请输入内容" class="layui-textarea" style="resize: none;"></textarea>
	    </div>
	  </div>

  <div class="layui-form-item  window-block-btn">
    <div class="layui-input-block">
    	<button type="button" class="layui-btn layui-btn-primary window-btn" id="canleBtn">取消</button>
      <button type="button" class="layui-btn window-btn" lay-submit="" lay-filter="confirmBtn">提交</button>
    </div>
 	</div>
</form>


</body>

<script src="../../../layui.all.js"></script>
<script src="../../../js/common.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="../../../zTree/jquery.ztree.all.js" type="text/javascript"></script>
<script type="text/javascript">
	
	 //主动加载jquery模块
	layui.use(['jquery', 'layer','laydate'], function(){
		var $ = layui.jquery //重点处
		,layer = layui.layer
		,laydate = layui.laydate;
		
		laydate.render({
	    elem: '#date',
	    value:new Date(),
	    trigger: 'click' //采用click弹出
	  });
		//得到父页面的值
		var index = (window.parent.index_);
		var id = (window.parent.id_);
		console.log(id);
		layui.use('form', function(){  
		 	var form = layui.form;
		 	//------表单提交-------
			form.on('submit(confirmBtn)', function (data) {
			    var obj = data.field;
			    console.log(obj);
			    //以下是ajax
			    
			    /*添加成功之后，关闭弹窗，刷新父页面*/
			    parent.layer.close(index);//关闭layer
			    $('#iframe',parent.document).attr('src', 'html/sys-mgt/sysLegal-mgt/sysLegal-mgt.html');
			});
			//取消
			$("body").on("click","#canleBtn",function(){
				parent.layer.close(index);//关闭layer
			})
			//点击搜索所属部门
			$("#search-btn").click(function(){
				$("#search-tree").slideToggle();//打开、关闭所属部门的树
			})
			//点击搜索角色列表
			$("#search2-btn").click(function(){
				$("#search2-tree").slideToggle();//打开、关闭所属部门的树
			})
			
		})	
	})
   
</script>
</html>